<div id="addServiceModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
     aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-body">
                <h3 class="m-t-none m-b "><span><vc:i18n name="添加服务" namespace="addService"></vc:i18n></span></h3>
                <div class="ibox-content">
                    <div>
                        <div>
               

                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label"><span><vc:i18n name="服务名称" namespace="addService"></vc:i18n></span></label>
                                <div class="col-sm-10">
                                    <input v-model="addServiceInfo.name" type="text" :placeholder="vc.i18n('必填，请填写服务名称','addService')"
                                           class="form-control">
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label"><span><vc:i18n name="服务编码" namespace="addService"></vc:i18n></span></label>
                                <div class="col-sm-10">
                                    <input v-model="addServiceInfo.serviceCode" type="text" :placeholder="vc.i18n('必填，请填写服务编码','addService')"
                                           class="form-control">
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label"><span><vc:i18n name="消息队列" namespace="addService"></vc:i18n></span></label>
                                <div class="col-sm-10">
                                    <input v-model="addServiceInfo.messageQueueName" type="text"
                                           :placeholder="vc.i18n('选填，请填写消息队列','addService')" class="form-control">
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label"><span><vc:i18n name="是否实例" namespace="addService"></vc:i18n></span></label>
                                <div class="col-sm-10">
                                    <select class="custom-select" v-model="addServiceInfo.isInstance">
                                        <option selected disabled value="">{{vc.i18n('必填','addService')}}，请填写是否实例</option>
                                        <option value="CMD">{{vc.i18n('微服务指令','addService')}}</option>
                                        <option value="Y">{{vc.i18n('是','addService')}}</option>
                                        <option value="N">{{vc.i18n('否','addService')}}</option>
                                        <option value="NT">{{vc.i18n('透传','addService')}}</option>
                                    </select>
                                </div>
                            </div>
                           

                            <div class="form-group row" v-if="addServiceInfo.isInstance == 'T' || addServiceInfo.isInstance == 'CMD'" >
                                <label class="col-sm-2 col-form-label"><span><vc:i18n name="调用服务" namespace="addService"></vc:i18n></span></label>
                                <div class="col-sm-10">
                                    <select class="custom-select" v-model="addServiceInfo.url">
                                        <option selected disabled value="">{{vc.i18n('必填','addService')}}，请选择调用服务</option>
                                        <option v-for="(item,index) in addServiceInfo.services" :key="index" :value="item.statusCd">{{item.name}}</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group row" v-else>
                                <label class="col-sm-2 col-form-label"><span><vc:i18n name="调用地址" namespace="addService"></vc:i18n></span></label>
                                <div class="col-sm-10">
                                    <input v-model="addServiceInfo.url" type="text" :placeholder="vc.i18n('选填，请填写调用地址','addService')"
                                           class="form-control">
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label"><span><vc:i18n name="调用方式" namespace="addService"></vc:i18n></span></label>
                                <div class="col-sm-10">
                                    <select class="custom-select" v-model="addServiceInfo.method">
                                        <option selected disabled value="">{{vc.i18n('必填','addService')}}，请选择调用方式</option>
                                        <option value="GET">http get</option>
                                        <option value="POST">http post</option>
                                    </select></div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label"><span><vc:i18n name="超时时间" namespace="addService"></vc:i18n></span></label>
                                <div class="col-sm-10">
                                    <input v-model="addServiceInfo.timeout" type="text" :placeholder="vc.i18n('必填，请填写超时时间','addService')"
                                           class="form-control">
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label"><span><vc:i18n name="重试次数" namespace="addService"></vc:i18n></span></label>
                                <div class="col-sm-10">
                                    <input v-model="addServiceInfo.retryCount" type="text" :placeholder="vc.i18n('必填，请填写重试次数','addService')"
                                           class="form-control">
                                </div>
                            </div>

                            <div class="ibox-content">
                                <button class="btn btn-primary float-right" type="button"
                                        v-on:click="saveServiceInfo()"><i class="fa fa-check"></i>&nbsp;保存
                                </button>
                                <button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
                                        data-dismiss="modal"><span><vc:i18n name="取消" namespace="addService"></vc:i18n></span>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
